<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Teacher List</title>
    <style>
        body {
            text-align: center;
            font-family: Arial, sans-serif;
        }
        table {
            margin: 20px auto;
            border-collapse: collapse;
        }
        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
        a {
            text-decoration: none;
            color: blue;
            margin: 0 5px;
        }
    </style>
</head>
<body>
<h2>教师基础信息录入</h2>
<form action="/list" method="post">
    <label for="name">Name:</label>
    <input type="text" id="name" name="name">

    <label for="age">Age:</label>
    <input type="text" id="age" name="age">

    <input type="submit" value="Search">
</form>

<table>
    <thead>
    <tr>
        <th>Name</th>
        <th>Id</th>
        <th>Age</th>
        <th>Action</th>
    </tr>
    </thead>
    <tbody>

    <tr th:each="teacher: ${teachers}">
        <td th:text="${teacher.name}"></td>
        <td th:text="${teacher.Id}"></td>
        <td th:text="${teacher.age}"></td>
        <td>
            <a th:href="@{/delete/{id}(id=${teacher.Id})}">Delete</a>
            <a th:href="@{/update/{id}(id=${teacher.Id})}">Update</a>
        </td>
    </tr>
    </tbody>
</table>

<div>
    <a href="/create">Create</a>
</div>

</body>
</html>